<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <!--如果是IE 就以标准渲染-->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

    <!-- 视窗——————响应式布局 -->
    <!-- <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=yes,minimum-scale=0.5" /> -->
    <meta name='viewport' content='width=device-width,initial-scale=1.0,minimum-scale=0.5, maximum-scale=5.0' />

    <!--当前页面的三要素-->
    <title>运维系统</title>
    <meta name="description" content="聚能优电" />
    <meta http-equiv="keywords" content="聚能优电" />
    <script type="text/javascript" src="./js/verify.js"></script>
    <script type="text/javascript" src="./js/common/commonfuntion.js"></script>
    <!-- css -->
    <link rel="stylesheet" type="text/css" href="./css/common/common.css" />
    <link rel="stylesheet" type="text/css" href="./css/jquery-accordion-menu.css" />
    <link rel="stylesheet" type="text/css" href="./css/mainmonitor_sz.css" />
    <link rel="stylesheet" type="text/css" href="./css/ywzt.css" />
    <style>
        .formbody .layoutmap .pcontent .ptitle{width:auto;}
    </style>
</head>

<body>
    <div id="container" class="mainmonitor_sz">
        <div class="mainmonitor_sz_01">
            <!--主屏内容-->
            <div class="mainmonitor_sz_screen">
                <div class="m_title">
                    <a href="JavaScript:history.go(-1);" class="back">
                        <img src="./images/back.svg" alt="" />
                    </a>
                    <span class="tit" id="projectNameCN"></span>
                </div>
                <div class="m_content">
                    <header class="tabHead" id="tabHead">
                        <span class="active" style="width:25%"><i>项目状态</i></span>
                        <span style="width:25%"><i>一次系统图</i></span>
                        <span style="width:25%"><i>数据报表</i></span>
                    </header>
                    <article class="khfxWarp khfxWarpaa" id="khfxWarp" style="background: #112957;box-shadow: 0 6px 12px 0 rgba(0,16,40,0.33);border-radius: 4px;">
                        <div class="khfxPane xmzt khfxPaneaa" id="firstkhfxPane">

                            <div class="zt1 ztdetail firstdetail" id="ywnum">
                                <div class="tit_tit" id="tit_tit">
                                    <img src="./images/titicon.svg" alt="" />
                                    <span>运维人员</span>
                                </div>
                                <div class="ywnum" id="ywnumwrap">
                                </div>
                            </div>


                            <div class="zt1 ztdetail firstdetail">
                                <div class="tit_tit">
                                    <img src="./images/titicon.svg" alt="" />
                                    <span>数据总览</span>
                                </div>
                                <ul>
                                    <li>
                                        <p>发电功率</p>
                                        <div class="ztdiv">
                                            <span id="dwgl">0</span><span>kW</span>

                                        </div>
                                    </li>
                                    <li>
                                        <p>PCS功率</p>
                                        <div class="ztdiv">
                                            <span id="pcsgl"></span><span>kW</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>负载功率</p>
                                        <div class="ztdiv">
                                            <span id="fzgl"></span><span>kW</span>
                                        </div>
                                    </li>
                                </ul>
                                <ul>
                                    <li>
                                        <p>防逆流值</p>
                                        <div class="ztdiv">
                                            <span id="fnlz">0</span><span>kW</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>SOC</p>
                                        <div class="ztdiv">
                                            <span id="soc">0</span><span>%</span>
                                        </div>
                                    </li>
                                    
                                    <li>
                                        <p>SOH</p>
                                        <div class="ztdiv">
                                            <span id="soh"></span><span>%</span>

                                        </div>
                                    </li>
                                    
                                </ul>
                            </div>

                            <div class="zt2 ztdetail">
                                <div class="tit_tit">
                                    <img src="./images/titicon.svg" alt="" />
                                    <span>电表</span>
                                </div>
                                <ul>
                                    <li>
                                        <p>负载功率</p>
                                        <div class="ztdiv">
                                            <span id="sz_fzgl">0</span><span>kW</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>总用电量</p>
                                        <div class="ztdiv">
                                            <span id="sz_zydl">0</span><span>kWh</span>
                                        </div>
                                    </li>
                                </ul>
                            </div>


                            <div class="zt2 ztdetail">
                                <div class="tit_tit">
                                    <img src="./images/titicon.svg" alt="" />
                                    <span>柴油机</span>
                                </div>
                                <div class="detail_tit">
                                    <span>01</span>
                                </div>
                                <ul style='border-bottom: 1px dashed #25427A;'>
                                    <li>
                                        <p>状态</p>
                                        <div class="ztdiv">
                                            <span id="zt_cnc2">0</span><span></span>
                                            
                                        </div>
                                    </li>
                                    <li>
                                        <p>发电功率</p>
                                        <div class="ztdiv">
                                            <span id="gl_cnc2">0</span><span>kW</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>燃油位</p>
                                        <div class="ztdiv">
                                            <span id="ryw_cnc2">0</span><span>%</span>
                                            
                                        </div>
                                    </li>
                                </ul>
                            </div>

                            <div class="zt2 ztdetail">
                                <div class="detail_tit">
                                    <span>02</span>
                                </div>
                                <ul style='border-bottom: 1px dashed #25427A;'>
                                    <li>
                                        <p>状态</p>
                                        <div class="ztdiv">


                                            <span id="zt_cnc1">0</span><span></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>发电功率</p>
                                        <div class="ztdiv">
                                            <span id="gl_cnc1">0</span><span>kW</span>
                                            
                                        </div>
                                    </li>
                                    <li>
                                        <p>燃油位</p>
                                        <div class="ztdiv">
                                            <span id="ryw_cnc1">0</span><span>%</span>
                                        </div>
                                    </li>
                                </ul>
                            </div>

                            <div class="zt2 ztdetail">
                                <div class="detail_tit">
                                    <span>03</span>
                                </div>
                                <ul style='border-bottom: 1px dashed #25427A;'>
                                    <li>
                                        <p>状态</p>
                                        <div class="ztdiv">
                                            <span id="zt_cnc3">0</span><span></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>发电功率</p>
                                        <div class="ztdiv">
                                            <span id="gl_cnc3">0</span><span>kW</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>燃油位</p>
                                        <div class="ztdiv">
                                            <span id="ryw_cnc3">0</span><span>%</span>
                                        </div>
                                    </li>
                                </ul>
                            </div>

                            <div class="zt2 ztdetail">
                                <div class="detail_tit">
                                    <span>04</span>
                                </div>
                                <ul>
                                    <li>
                                        <p>状态</p>
                                        <div class="ztdiv">
                                            <span id="zt_cnc4">0</span><span></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>发电功率</p>
                                        <div class="ztdiv">
                                            <span id="gl_cnc4">0</span><span>kW</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>燃油位</p>
                                        <div class="ztdiv">
                                            <span id="ryw_cnc4">0</span><span>%</span>
                                        </div>
                                    </li>
                                </ul>
                            </div>

                            <div class="zt2 ztdetail">
                                <div class="tit_tit">
                                    <img src="./images/titicon.svg" alt="" />
                                    <span>储能变流器</span>
                                </div>
                                <div class="detail_tit">
                                    <span>01</span>
                                </div>
                                <ul style='border-bottom: 1px dashed #25427A;'>
                                    <li>
                                        <p>总有功功率</p>
                                        <div class="ztdiv">
                                            <span id="pcszyggl_sz1">0</span><span>kW</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>总视在功率</p>
                                        <div class="ztdiv">
                                            <span id="pcszszgl_sz1">0</span><span>kVA</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>总无功功率</p>
                                        <div class="ztdiv">
                                            <span id="pcszwggl_sz1">0</span><span>kVar</span>
                                        </div>
                                    </li>
                                </ul>
                            </div>

                            <div class="zt2 ztdetail">
                                <div class="detail_tit">
                                    <span>02</span>
                                </div>
                                <ul>
                                    <li>
                                        <p>总有功功率</p>
                                        <div class="ztdiv">
                                            <span id="pcszyggl_sz2">0</span><span>kW</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>总视在功率</p>
                                        <div class="ztdiv">
                                            <span id="pcszszgl_sz2">0</span><span>kVA</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>总无功功率</p>
                                        <div class="ztdiv">
                                            <span id="pcszwggl_sz2">0</span><span>kVar</span>
                                        </div>
                                    </li>
                                </ul>
                            </div>


                            <div class="zt2 ztdetail">
                                <div class="tit_tit">
                                    <img src="./images/titicon.svg" alt="" />
                                    <span>储能电池</span>
                                </div>
                                <div class="detail_tit">
                                    <span>01</span>
                                </div>
                                <ul style='border-bottom: 1px dashed #25427A;'>
                                    <li>
                                        <p>SOC</p>
                                        <div class="ztdiv">
                                            <span id="bmssoc1">0</span><span>%</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>可充电量</p>
                                        <div class="ztdiv">
                                            <span id="bmskcdl1">0</span><span>kWh</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>可放电量</p>
                                        <div class="ztdiv">
                                            <span id="bmskfdl1">0</span><span>kWh</span>
                                        </div>
                                    </li>
                                </ul>
                            </div>

                            <div class="zt2 ztdetail">
                                <div class="detail_tit">
                                    <span>02</span>
                                </div>
                                <ul>
                                    <li>
                                        <p>SOC</p>
                                        <div class="ztdiv">
                                            <span id="bmssoc2">0</span><span>%</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>可充电量</p>
                                        <div class="ztdiv">
                                            <span id="bmskcdl2">0</span><span>kWh</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>可放电量</p>
                                        <div class="ztdiv">
                                            <span id="bmskfdl2">0</span><span>kWh</span>
                                        </div>
                                    </li>
                                </ul>
                            </div>

                            <div class="zt3 ztdetail">
                                <div class="tit_tit">
                                    <img src="./images/titicon.svg" alt="" />
                                    <span>设备温度</span>
                                </div>
                                <div class="detail_tit">
                                    <span>01</span>
                                </div>
                                <ul>
                                    <li>
                                        <p>散热器温度</p>
                                        <div class="ztdiv">
                                            <span id="fkwd1">24</span><span>℃</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>机柜温度</p>
                                        <div class="ztdiv">
                                            <span id="jgwd1">15</span><span>℃</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>环境温度</p>
                                        <div class="ztdiv">
                                            <span id="hjwd1">16</span><span>℃</span>
                                        </div>
                                    </li>
                                </ul>
                                <ul style='border-bottom: 1px dashed #25427A;'>
                                    <li>
                                        <p>电池最高温度</p>
                                        <div class="ztdiv">
                                            <span id="dczgwd1">23.4</span><span>℃</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>电池最低温度</p>
                                        <div class="ztdiv">
                                            <span id="dczdwd1">22.2</span><span>℃</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p></p>
                                        <div class="ztdiv"><span id=""></span><span></span></div>
                                    </li>
                                </ul>
                            </div>

                            <div class="zt3 ztdetail">
                                <div class="detail_tit">
                                    <span>02</span>
                                </div>
                                <ul>
                                    <li>
                                        <p>散热器温度</p>
                                        <div class="ztdiv">
                                            <span id="fkwd2">24</span><span>℃</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>机柜温度</p>
                                        <div class="ztdiv">
                                            <span id="jgwd2">15</span><span>℃</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>环境温度</p>
                                        <div class="ztdiv">
                                            <span id="hjwd2">16</span><span>℃</span>
                                        </div>
                                    </li>
                                </ul>
                                <ul>
                                    <li>
                                        <p>电池最高温度</p>
                                        <div class="ztdiv">
                                            <span id="dczgwd2">23.4</span><span>℃</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>电池最低温度</p>
                                        <div class="ztdiv">
                                            <span id="dczdwd2">22.2</span><span>℃</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p></p>
                                        <div class="ztdiv"><span id=""></span><span></span></div>
                                    </li>
                                </ul>
                            </div>

                            <div class="zt4 ztdetail">
                                <div class="tit_tit">
                                    <img src="./images/titicon.svg" alt="" />
                                    <span>设备状态</span>
                                </div>
                                <div class="detail_tit">
                                    <span>01</span>
                                </div>
                                <ul>
                                    <li>
                                        <p>交流调度</p>
                                        <div class="ztdiv jldt1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>直流调度</p>
                                        <div class="ztdiv zldd1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>PCS通讯状态</p>
                                        <div class="ztdiv pcstxzt1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>BMS通讯状态</p>
                                        <div class="ztdiv bmstxzt1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                </ul>
                                <ul>
                                    <li>
                                        <p>并网</p>
                                        <div class="ztdiv bw1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>离网</p>
                                        <div class="ztdiv lw1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>系统警告</p>
                                        <div class="ztdiv xtjg1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>系统故障</p>
                                        <div class="ztdiv xtgz1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                </ul>
                                <ul style='border-bottom: 1px dashed #25427A;'>
                                    <li>
                                        <p>远程控制</p>
                                        <div class="ztdiv yckz1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>BMS一级警告</p>
                                        <div class="ztdiv yjjg1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>BMS二级警告</p>
                                        <div class="ztdiv ejjg1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>BMS三级警告</p>
                                        <div class="ztdiv sjjg1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                </ul>
                            </div>

                            <div class="zt4 ztdetail">
                                <div class="detail_tit">
                                    <span>02</span>
                                </div>
                                <ul>
                                    <li>
                                        <p>交流调度</p>
                                        <div class="ztdiv jldt2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>直流调度</p>
                                        <div class="ztdiv zldd2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>PCS通讯状态</p>
                                        <div class="ztdiv pcstxzt2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>BMS通讯状态</p>
                                        <div class="ztdiv bmstxzt2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                </ul>
                                <ul>
                                    <li>
                                        <p>并网</p>
                                        <div class="ztdiv bw2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>离网</p>
                                        <div class="ztdiv lw2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>系统警告</p>
                                        <div class="ztdiv xtjg2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>系统故障</p>
                                        <div class="ztdiv xtgz2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                </ul>
                                <ul>
                                    <li>
                                        <p>远程控制</p>
                                        <div class="ztdiv yckz2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>BMS一级警告</p>
                                        <div class="ztdiv yjjg2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>BMS二级警告</p>
                                        <div class="ztdiv ejjg2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>BMS三级警告</p>
                                        <div class="ztdiv sjjg2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                </ul>
                            </div>

                            <div class="echarts_wrap">
                                <div id="echarts1" style="height:4rem;margin-top:0.3rem;"></div>
                                <div id="echarts2" style="height:4rem;margin-top:0.5rem;"></div>
                                <div id="echarts3" style="height:4rem;margin-top:0.5rem;"></div>
                            </div>
                        </div>

                        <div class="khfxPane khfxPaneaa" id="secondkhfxPane">
                            <div class="formbody">
                                <div class="layoutmap">
                                    <div id="grightline1" class="hp hpthin goright"
                                        style="left:8%; top:13.5%;  width:90%; z-index: 1;"></div>

                                    <!-- <div id="grightline2" class="hp hpthin goright"
                                        style="left:20%; top:46%;  width:23%;z-index: 1;"></div>
                                    <div id="grightline3" class="hp hpthin goright"
                                        style="left:66%; top:46%;  width:23%;z-index: 1;"></div> -->

                                    <div id="pcs1">
                                        <!-- pcs的p为正数，箭头方向为从上到下 -->
                                        <!-- pcs的p为负数，箭头方向为从下到上 -->
                                    </div>

                                    <div id="pcs2">
                                        <!-- pcs的p为正数，箭头方向为从上到下 -->
                                        <!-- pcs的p为负数，箭头方向为从下到上 -->
                                    </div>

                                    <div class="layoutimage bordernull" title="柴油机"
                                        style="left:0%; top:5%; width:13.5%;">
                                        <img src="./images/chaiyoujib.svg" alt="" style="width:100%;position: absolute;left: 50%;top: 50%;transform: translate(-50%, -50%);z-index: 2;" class="tocyj" />
                                    </div>
                                    <div class="infobox chaiyouji" style="left:0%; top:19%;z-index: 2;padding:0;">
                                        <div class="pcontent">
                                            <p class="ptitle">U(V):</p>
                                            <div id="cyj_sxdy"></div>
                                        </div>
                                        <div class="pcontent">
                                            <p class="ptitle">I(A):</p>
                                            <div id="cyj_sxdl"></div>
                                        </div>
                                        <div class="pcontent">
                                            <p class="ptitle">P(kW):</p>
                                            <div id="cyj_rp"></div>
                                        </div>
                                    </div>

                                    <div class="layoutimage bordernull" title="一级柜"
                                        style="left:64%; top:5%; width:13.5%; z-index: 2;">
                                        <img src="./images/yjgb.svg" alt="" style="width:100%;position: absolute;left: 50%;top: 50%;transform: translate(-50%, -50%);" class="toyjg" />
                                    </div>

                                    <div onclick="window.location.href='#';" class="layoutimage bordernull" title="负载"
                                        style="left: 85%; top:5%; width:13.5%;z-index: 2;">
                                        <img src="./images/fuzaib.svg" alt=""
                                            style="width:100%;position: absolute;left: 50%;top: 50%;transform: translate(-50%, -50%);" />
                                    </div>
                                    <div class="infobox mainfuzai" style="left:82%; top:19%;z-index: 2;">
                                        <div class="pcontent">
                                            <p class="ptitle">P(kW):</p>
                                            <div id="load"></div>
                                        </div>
                                    </div>

                                    <div class="layoutimage bordernull" title="PCS1" style="left:14%; top:38%; width:13.5%;z-index: 2;">
                                        <img src="./images/pcsb.svg" alt="" style="width:100%;position: absolute;left: 50%;top: 50%;transform: translate(-50%, -50%);" class="topcs" />
                                    </div>
                                    <div class="infobox mainpcs1" style="left:10%; top:52%;z-index: 2;">
                                        <div class="pcontent">
                                            <p class="ptitle">U(V):</p>
                                            <div id="pcs1_sxdy"></div>
                                        </div>
                                        <div class="pcontent">
                                            <p class="ptitle">I(A):</p>
                                            <div id="pcs1_sxdl"></div>
                                        </div>

                                        <div class="pcontent">
                                            <span>P(kW):</span><span id="pcs1_rp"></span>
                                        </div>

                                        <div class="pcontent">
                                            <span>并离网:</span><span id="pcs1_blw"></span>
                                        </div>
                                    </div>

                                    <div class="layoutimage bordernull" title="PCS2"
                                        style="left:52%; top:38%; width:13.5%;z-index: 2;">
                                        <img src="./images/pcsb.svg" alt="" style="width:100%;position: absolute;left: 50%;top: 50%;transform: translate(-50%, -50%);" class="topcs" />
                                    </div>
                                    <div class="infobox mainpcs2" style="left:51%; top:52%;z-index: 2;padding-left:0;">
                                        <div class="pcontent">
                                            <p class="ptitle">U(V):</p>
                                            <div id="pcs2_sxdy"></div>
                                        </div>
                                        <div class="pcontent">
                                            <p class="ptitle">I(A):</p>
                                            <div id="pcs2_sxdl"></div>
                                        </div>
                                        <div class="pcontent">
                                            <span>P(kW):</span><span id="pcs2_rp"></span>
                                        </div>
                                        <div class="pcontent">
                                            <span>并离网:</span><span id="pcs2_blw"></span>
                                        </div>

                                    </div>

                                    <div class="layoutimage bordernull" title="BMS1" style="left:14%; top:72%; width:13.5%;z-index: 2;">
                                        <img src="./images/bmsb.svg" alt="" style="width:100%;position: absolute;left: 50%;top: 50%;transform: translate(-50%, -50%);" class="tobms" />
                                    </div>

                                    <div class="infobox mainbms1" style="left:10%; top:86%;z-index: 2;width: 40%;">
                                        <div class="pcontent">
                                            <span>U(V):</span><span id="bms1_dy"></span>
                                        </div>
                                        <div class="pcontent">
                                            <span>I(A):</span><span id="bms1_dl"></span>
                                        </div>
                                        <div class="pcontent">
                                            <span>SOC:</span><span id="bms1_soc"></span>
                                        </div>
                                        <div class="pcontent">
                                            <span>最高电压(V):</span><span id="mbtid1"></span>
                                        </div>
                                        <div class="pcontent">
                                            <span>最低电压(V):</span><span id="lbtid1"></span>
                                        </div>
                                    </div>

                                    <div class="layoutimage bordernull" title="BMS2" style="left:52%; top:72%; width:13.5%;z-index: 2;">
                                        <img src="./images/bmsb.svg" alt="" style="width:100%;position: absolute;left: 50%;top: 50%;transform: translate(-50%, -50%);" class="tobms" />
                                    </div>
                                    <div class="infobox mainbms2" style="left:48%; top:86%;z-index: 2;width: 40%;">
                                        <div class="pcontent">
                                            <span>U(V):</span><span id="bms2_dy"></span>
                                        </div>
                                        <div class="pcontent">
                                            <span>I(A):</span><span id="bms2_dl"></span>
                                        </div>
                                        <div class="pcontent">
                                            <span>SOC:</span><span id="bms2_soc"></span>
                                        </div>
                                        <div class="pcontent">
                                            <span>最高电压(V):</span><span id="mbtid2"></span>
                                        </div>
                                        <div class="pcontent">
                                            <span>最低电压(V):</span><span id="lbtid2"></span>
                                        </div>

                                    </div>

                                </div>
                            </div>
                        </div>

                        <div class="khfxPane xmzt khfxPaneaa" id="thirdkhfxPane" style="width: 90%;padding:0 5% 0.4rem;">
                            <div class="select_wrap">
                                <select id="selectsb" value=""></select>
                                <!-- <img src="./images/xiala.svg" alt=""> -->
                            </div>

                            <div class="tablist" id="tablist">
                                <div class="list listcon">
                                    <div class="nyztab">
                                        <span class="active">一周</span>
                                        <span>月份</span>
                                        <span>一年</span>
                                    </div>
                                    <div class="nyz">
                                        <span class="nyzcon theweek weekyear" id="theweek"></span>
                                        <span class="nyzcon themounth" id="themounth">
                                            <div class="selectmonth_wrap">
                                                <select id="selectmonth" value="">
                                                </select>
                                                <!-- <img src="./images/xiala.svg" alt=""> -->
                                            </div>
                                            <div class="mounth_wrap" id="thedetailmounth"></div>
                                        </span>
                                        <span class="nyzcon theyear weekyear" id="theyear"></span>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                    </article>
                </div>
            </div>
        </div>
    </div>

    <script>
        (function (win, doc) {
            var docEl = doc.documentElement || document.body; //获取HTML标签

            var container = doc.getElementById("container"); //container元素
            //判断是移动端设备还是PC,移动 就采用'orientationchange',横竖屏事件，PC端就采用onresize，窗口改变时间
            var resize =
                "onorientationchange" in win ? "orientationchange" : "resize";

            function rem() {
                docEl.style.fontSize = 100 * (container.clientWidth / 750) + "px";
            }

            //监听'DOMContent事件:DOM加载完成执行,如果DOMContent事件，那么执行rem函数
            doc.addEventListener("DOMContentLoaded", rem, false);

            //win下监听resize事件,如果resize事件，那么执行rem函数
            win.addEventListener(resize, rem, false);
        })(window, document);
    </script>
    <!-- js -->
    <script type="text/javascript" src="./js/jquery-3.4.1.js"></script>
    <script type="text/javascript" src="js/echarts.js"></script>
    <script type="text/javascript" src="./layer/layer.js"></script>


    <script>
        $(document).ready(function () {

            var index = layer.load(0, {
                shade: [0.8, '#fff']
            }); //0.1透明度的白色背景

            var projectid = GetQueryString('projectid');
            var linechartid = GetQueryString('linechartid');
            var projectNameCN = GetQueryString('projectNameCN');
            $("#projectNameCN").html(' ');
            $("#projectNameCN").html(projectNameCN);
            $("#tit_tit").append(`
                <div style="position:absolute;top:2px;right:5px;font-size: 0.24rem;color: #435a7a;font-weight: bold;letter-spacing: 0.88px;" id="showtime"></div>
            `);


            $.ajax({
                type: "GET",
                dataType: "json",
                url: "http://112.74.169.99:21021/api/services/app/ProjectService/GetYWProjectMemberListByProjectId?id=" + projectid,
                beforeSend: function (xhr) {
                    xhr.setRequestHeader("Accept", "application/json, text/javascript, */*; q=0.01");
                    xhr.setRequestHeader("Authorization", accessToken);
                    xhr.setRequestHeader('.AspNetCore.Culture', 'zh-Hans');
                },
                success: function (res) {
                    console.log(res);
                    $("#ywnumwrap").html(` `);
                    $("#ywnumwrap").html( showywnum(res.result) );
                },
                error: function (err) {
                    console.log("首次请求数据 请求失败");
                }
            });

            function showywnum(obj) {
                var str = '';
                if (obj.constructor==Array) {
                    if(obj.length == 0){
                        str += `<p style="font-weight: bold;font-family: MicrosoftYaHei;font-size: 14px;color: #CDDDF3;margin-left:18px;"><span>无</span></p>`
                    }else {
                        for(var i = 0, len = obj.length; i < len; i++){
                            str += `<p><span>` + obj[i].userName + `</span><span>` + obj[i].phoneNumber + `</span></p>`
                        }
                    }
                    return str
                }
                return obj;
            }



            $.ajax({
                type: "GET",
                dataType: "json",
                url: "http://112.74.169.99:21021/api/TokenAuth/GetProjectData?projectid=" + projectid,
                beforeSend: function (xhr) {
                    xhr.setRequestHeader("Accept", "application/json, text/javascript, */*; q=0.01");
                    xhr.setRequestHeader("Authorization", accessToken);
                    xhr.setRequestHeader('.AspNetCore.Culture', 'zh-Hans');
                },
                success: function (res) {
                    var data = res.result;
                    if (data.length == 0) {
                        layer.open({
                            type: 1,
                            content: '<div>' + '通讯异常' + '</div>',
                            btn: '确定',
                            btnAlign: 'c', //按钮居中
                            shade: 0, //不显示遮罩
                            yes: function () {
                                layer.closeAll();
                                layer.close(index);
                            }
                        });
                    } else {

                        let time = data[0].creationTime.split('T');

                        $("#showtime").html(' ');
                        $("#showtime").html('数据更新时间 ' + time[1].substring(0,8));



                        // BMS SOC 百分比
                        var val_soc_sz = Number((data[2].soc + data[3].soc) / 2).toFixed(0); // BMS SOC 百分比
                        $("#soc").html(val_soc_sz); // BMS SOC 百分比

                        var val_soh = (data[2].soh + data[3].soh) / 20;
                        $("#soh").html(val_soh); // //BMS SOH

                        var val_dwgl_sz = Number(data[6].powerGeneration + data[7].powerGeneration + data[8].powerGeneration + data[9].powerGeneration); // 发电功率
                        $("#dwgl").html( dealnumber(val_dwgl_sz) ); // 发电功率

                        $("#pcsgl").html( dealnumber(data[11].pcstap) ); // PCS总有功功率
                        $("#fzgl").html( dealnumber(data[11].loadTAP) ); // 负载功率
                        $("#fnlz").html( dealnumber(data[11].countercurrentControl) ); // 防逆流值

                        // 电表
                        $("#sz_fzgl").html( dealnumber(data[11].loadTAP) ); // 负载功率
                        $("#sz_zydl").html( dealnumber(data[12].tpap) ); // 总用电量

                        // 柴油机1
                        var cyjstatus1 = '';
                        var stopMode1 = data[6].stopMode;
                        var transferToMains1 = data[6].transferToMains;
                        if ((stopMode1 == 0) && (transferToMains1 == 0)) {
                            cyjstatus1 = '分闸运行';
                        } else if ((stopMode1 == 0) && (transferToMains1 == 1)) {
                            cyjstatus1 = '合闸运行';
                        } else if (stopMode1 == 1) {
                            cyjstatus1 = '停机';
                        }
                        var val_fuel_cnc1 = Number(data[6].fuelLevel).toFixed(0);
                        $("#zt_cnc1").html(cyjstatus1); // 状态

                        $("#gl_cnc1").html(dealnumber(data[6].powerGeneration)); // 发电功率
                        $("#ryw_cnc1").html(val_fuel_cnc1); // 燃油位 百分比

                        // 柴油机2
                        var cyjstatus2 = '';
                        var stopMode2 = data[7].stopMode;
                        var transferToMains2 = data[7].transferToMains;
                        if ((stopMode2 == 0) && (transferToMains2 == 0)) {
                            cyjstatus2 = '分闸运行';
                        } else if ((stopMode2 == 0) && (transferToMains2 == 1)) {
                            cyjstatus2 = '合闸运行';
                        } else if (stopMode2 == 1) {
                            cyjstatus2 = '停机';
                        }
                        var val_fuel_cnc2 = Number(data[7].fuelLevel).toFixed(0);
                        $("#zt_cnc2").html(cyjstatus2); // 状态
                        $("#gl_cnc2").html(dealnumber(data[7].powerGeneration)); // 功率
                        $("#ryw_cnc2").html(val_fuel_cnc2); // 燃油位 百分比

                        // 柴油机3
                        var cyjstatus3 = '';
                        var stopMode3 = data[8].stopMode;
                        var transferToMains3 = data[8].transferToMains;
                        if ((stopMode3 == 0) && (transferToMains3 == 0)) {
                            cyjstatus3 = '分闸运行';
                        } else if ((stopMode3 == 0) && (transferToMains3 == 1)) {
                            cyjstatus3 = '合闸运行';
                        } else if (stopMode3 == 1) {
                            cyjstatus3 = '停机';
                        }
                        var val_fuel_cnc3 = Number(data[8].fuelLevel).toFixed(0);
                        $("#zt_cnc3").html(cyjstatus3); // 状态
                        $("#gl_cnc3").html(dealnumber(data[8].powerGeneration)); // 功率
                        $("#ryw_cnc3").html(val_fuel_cnc3); // 燃油位 百分比

                        // 柴油机4
                        var cyjstatus4 = '';
                        var stopMode4 = data[9].stopMode;
                        var transferToMains4 = data[9].transferToMains;
                        if ((stopMode4 == 0) && (transferToMains4 == 0)) {
                            cyjstatus4 = '分闸运行';
                        } else if ((stopMode4 == 0) && (transferToMains4 == 1)) {
                            cyjstatus4 = '合闸运行';
                        } else if (stopMode4 == 1) {
                            cyjstatus4 = '停机';
                        }
                        var val_fuel_cnc4 = Number(data[9].fuelLevel).toFixed(0);
                        $("#zt_cnc4").html(cyjstatus4); // 状态
                        $("#gl_cnc4").html(dealnumber(data[9].powerGeneration)); // 功率
                        $("#ryw_cnc4").html(val_fuel_cnc4); // 燃油位 百分比

                        // PCS1
                        $("#pcszyggl_sz1").html(dealnumber(data[0].tap)); //PCS总有功功率
                        $("#pcszszgl_sz1").html(dealnumber(data[0]
                            .tApparentP)); //PCS总视在功率
                        $("#pcszwggl_sz1").html(dealnumber(data[0].trp)); //PCS总无功功率

                        // PCS2
                        $("#pcszyggl_sz2").html(dealnumber(data[1].tap)); //PCS总有功功率
                        $("#pcszszgl_sz2").html(dealnumber(data[1]
                            .tApparentP)); //PCS总视在功率
                        $("#pcszwggl_sz2").html(dealnumber(data[1].trp)); //PCS总无功功率

                        // BMS1
                        $("#bmssoc1").html(dealnumber(data[2].soc)); //BMS SOC
                        $("#bmskcdl1").html(dealnumber(data[2].group_RC)); //BMS可充电量
                        $("#bmskfdl1").html(dealnumber(data[2].group_DQ)); //BMS可放电量

                        // BMS2
                        $("#bmssoc2").html(dealnumber(data[3].soc)); //BMS SOC
                        $("#bmskcdl2").html(dealnumber(data[3].group_RC)); //BMS可充电量
                        $("#bmskfdl2").html(dealnumber(data[3].group_DQ)); //BMS可放电量

                        // 设备温度1
                        $("#fkwd1").html(dealnumber(data[0].radiatorT)); //散热器温度
                        $("#jgwd1").html(dealnumber(data[0].cabinetT)); //机柜温度
                        $("#hjwd1").html(dealnumber(data[0].environmentalT)); //环境温度
                        $("#dczgwd1").html(dealnumber(data[2].mbt)); //电池最高温度
                        $("#dczdwd1").html(dealnumber(data[2].lbt)); //电池最低温度

                        // 设备温度2
                        $("#fkwd2").html(dealnumber(data[1].radiatorT)); //散热器温度
                        $("#jgwd2").html(dealnumber(data[1].cabinetT)); //机柜温度
                        $("#hjwd2").html(dealnumber(data[1].environmentalT)); //环境温度
                        $("#dczgwd2").html(dealnumber(data[3].mbt)); //电池最高温度
                        $("#dczdwd2").html(dealnumber(data[3].lbt)); //电池最低温度

                        // 设备状态1
                        if (data[0].acDispatch) {
                            // 交流调度
                            $(".jldt1 span").attr('class', 'onoff zton');
                        } else {
                            $(".jldt1 span").attr('class', 'onoff ztoff');
                        }
                        if (data[0].dcDispatch) {
                            // 直流调度
                            $(".zldd1 span").attr('class', 'onoff zton');
                        } else {
                            $(".zldd1 span").attr('class', 'onoff ztoff');
                        }
                        if (data[0].runState) {
                            // PCS通讯状态/运行状态
                            $(".pcstxzt1 span").attr('class', 'onoff zton');
                        } else {
                            $(".pcstxzt1 span").attr('class', 'onoff ztoff');
                        }
                        if (data[2].comState) {
                            // BMS通讯状态
                            $(".bmstxzt1 span").attr('class', 'onoff zton');
                        } else {
                            $(".bmstxzt1 span").attr('class', 'onoff ztoff');
                        }

                        if (data[0].gridState) {
                            // 并网、离网
                            $(".bw1 span").attr('class', 'onoff ztoff');
                            $(".lw1 span").attr('class', 'onoff zton');
                        } else {
                            $(".bw1 span").attr('class', 'onoff zton');
                            $(".lw1 span").attr('class', 'onoff ztoff');
                        }
                        if (data[0].warnState) {
                            // 系统告警/告警状态
                            $(".xtjg1 span").attr('class', 'onoff zton');
                        } else {
                            $(".xtjg1 span").attr('class', 'onoff ztoff');
                        }
                        if (data[0].failureStatus) {
                            // 系统故障/故障状态
                            $(".xtgz1 span").attr('class', 'onoff zton');
                        } else {
                            $(".xtgz1 span").attr('class', 'onoff ztoff');
                        }

                        if (data[0].remoteControl) {
                            // 远程控制
                            $(".yckz1 span").attr('class', 'onoff zton');
                        } else {
                            $(".yckz1 span").attr('class', 'onoff ztoff');
                        }

                        if (data[2].primaryAlarm) {
                            // BMS一级告警
                            $(".yjjg1 span").attr('class', 'onoff zton');
                        } else {
                            $(".yjjg1 span").attr('class', 'onoff ztoff');
                        }

                        if (data[2].secondaryAlarm) {
                            // BMS二级告警
                            $(".ejjg1 span").attr('class', 'onoff zton');
                        } else {
                            $(".ejjg1 span").attr('class', 'onoff ztoff');
                        }

                        if (data[2].tertiaryAlarm) {
                            // BMS三级告警
                            $(".sjjg1 span").attr('class', 'onoff zton');
                        } else {
                            $(".sjjg1 span").attr('class', 'onoff ztoff');
                        }

                        // 设备状态2
                        if (data[1].acDispatch) {
                            // 交流调度
                            $(".jldt2 span").attr('class', 'onoff zton');
                        } else {
                            $(".jldt2 span").attr('class', 'onoff ztoff');
                        }
                        if (data[1].dcDispatch) {
                            // 直流调度
                            $(".zldd2 span").attr('class', 'onoff zton');
                        } else {
                            $(".zldd2 span").attr('class', 'onoff ztoff');
                        }
                        if (data[1].runState) {
                            // PCS通讯状态/运行状态
                            $(".pcstxzt2 span").attr('class', 'onoff zton');
                        } else {
                            $(".pcstxzt2 span").attr('class', 'onoff ztoff');
                        }
                        if (data[3].comState) {
                            // BMS通讯状态
                            $(".bmstxzt2 span").attr('class', 'onoff zton');
                        } else {
                            $(".bmstxzt2 span").attr('class', 'onoff ztoff');
                        }

                        if (data[1].gridState) {
                            // 并网、离网
                            $(".bw2 span").attr('class', 'onoff ztoff');
                            $(".lw2 span").attr('class', 'onoff zton');
                        } else {
                            $(".bw2 span").attr('class', 'onoff zton');
                            $(".lw2 span").attr('class', 'onoff ztoff');
                        }
                        if (data[1].warnState) {
                            // 系统告警/告警状态
                            $(".xtjg2 span").attr('class', 'onoff zton');
                        } else {
                            $(".xtjg2 span").attr('class', 'onoff ztoff');
                        }
                        if (data[1].failureStatus) {
                            // 系统故障/故障状态
                            $(".xtgz2 span").attr('class', 'onoff zton');
                        } else {
                            $(".xtgz2 span").attr('class', 'onoff ztoff');
                        }

                        if (data[1].remoteControl) {
                            // 远程控制
                            $(".yckz2 span").attr('class', 'onoff zton');
                        } else {
                            $(".yckz2 span").attr('class', 'onoff ztoff');
                        }

                        if (data[3].primaryAlarm) {
                            // BMS一级告警
                            $(".yjjg2 span").attr('class', 'onoff zton');
                        } else {
                            $(".yjjg2 span").attr('class', 'onoff ztoff');
                        }

                        if (data[3].secondaryAlarm) {
                            // BMS二级告警
                            $(".ejjg2 span").attr('class', 'onoff zton');
                        } else {
                            $(".ejjg2 span").attr('class', 'onoff ztoff');
                        }

                        if (data[3].tertiaryAlarm) {
                            // BMS三级告警
                            $(".sjjg2 span").attr('class', 'onoff zton');
                        } else {
                            $(".sjjg2 span").attr('class', 'onoff ztoff');
                        }
                        layer.close(index);
                    }

                },
                error: function (err) {
                    console.log("首次请求数据 请求失败");
                }
            });

            // tab选项卡切换
            $(".tabHead span").on("click", function () {
                var $this = $(this);
                var itemIndex = $this.index();
                $(this).addClass("active").siblings(".tabHead span").removeClass("active");
                $(".khfxPane").eq(itemIndex).show().siblings(".khfxPane").hide();
            });


            // 请求数据报表数据
            $.ajax({
                type: "GET",
                dataType: "json",
                url: "http://112.74.169.99:21021/api/services/app/ReportService/GetReportDLTDGDataByDay?type=1&groupid=1&projectid=" + projectid,
                beforeSend: function (xhr) {
                    xhr.setRequestHeader("Accept", "application/json, text/javascript, */*; q=0.01");
                    xhr.setRequestHeader("Authorization", accessToken);
                    xhr.setRequestHeader('.AspNetCore.Culture', 'zh-Hans');
                },
                success: function (res) {
                    if(res.success == true){
                        let dataall = res.result;
                        

                        $.ajax({
                            type: "GET",
                            dataType: "json",
                            url: "http://112.74.169.99:21021/api/services/app/DeviceGroupService/GetDeviceGroupsByProjectID?id=" + projectid,
                            beforeSend: function (xhr) {
                                xhr.setRequestHeader("Accept", "application/json, text/javascript, */*; q=0.01");
                                xhr.setRequestHeader("Authorization", accessToken);
                                xhr.setRequestHeader('.AspNetCore.Culture', 'zh-Hans');
                            },
                            success: function (res) {
                                
                                if(res.success == true){
                                    let data = res.result;
                                    $("#selectsb").html( selectsbeach(data) );
                                    $("#theweek").html( selectsbeachcon(dataall) );
                                    
                                }
                            }
                        });
                    }
                }
            });
            
            // 设备下拉框切换
            $("#selectsb").change(function () {
                let choicesb = $("#selectsb option:selected").attr('value');
                $(".tablist .listcon").eq(choicesb).show().siblings(".tablist .listcon").hide();
                let thetype;
                if(choicesb == 0){thetype = 1;}
                else{thetype = 0;}

                var choicewmy = $(this).parent().next().find('.nyztab span');
                $(choicewmy).each(function(index,item){
                    if($(item).hasClass('active')){

                        if(index == 0){ //一周
                            $.ajax({
                                type: "GET",
                                dataType: "json",
                                url: "http://112.74.169.99:21021/api/services/app/ReportService/GetReportDLTDGDataByDay?type="+thetype+"&groupid="+choicesb+"&projectid=" + projectid,
                                beforeSend: function (xhr) {
                                    xhr.setRequestHeader("Accept", "application/json, text/javascript, */*; q=0.01");
                                    xhr.setRequestHeader("Authorization", accessToken);
                                    xhr.setRequestHeader('.AspNetCore.Culture', 'zh-Hans');
                                },
                                success: function (res) {
                                    if(res.success == true){
                                        $("#theweek").html('');
                                        $("#theweek").html( selectsbeachcon(res.result) );
                                    }
                                }
                            });

                        }else if(index == 1){//月份
                            var index2 = layer.load(0, {
                                shade: [0.8, '#fff']
                            }); //0.1透明度的白色背景
                            var mouthchose = Number($("#selectmonth option:selected").attr('value')) + 1;

                            $.ajax({
                                type: "GET",
                                dataType: "json",
                                url: "http://112.74.169.99:21021/api/services/app/ReportService/GetReportDLTDGDataByMonth?type="+thetype+"&groupid="+choicesb+"&projectid="+projectid+"&month="+ mouthchose,
                                beforeSend: function (xhr) {
                                    xhr.setRequestHeader("Accept", "application/json, text/javascript, */*; q=0.01");
                                    xhr.setRequestHeader("Authorization", accessToken);
                                    xhr.setRequestHeader('.AspNetCore.Culture', 'zh-Hans');
                                },
                                success: function (res) {
                                    if(res.success == true){
                                        let data = res.result;

                                        $("#thedetailmounth").html('');
                                        $("#thedetailmounth").html(selectsbeachcon(data));
                                        layer.close(index2);
                                        

                                    }
                                }
                            });

                        }
                    }

                })



            });



             // 周月年切换选项卡切换
             $(".tablist .listcon .nyztab >span").on("click", function () {
                
                var groupid = $(this).parents('#tablist').prev().find('select').val();
                let thetype;
                if(groupid == 0){
                    thetype = 1;
                }else{
                    thetype = 0;
                }
                var itemIndex = $(this).index();
                $(this).addClass("active").siblings(".tablist .listcon .nyztab >span").removeClass("active"); 
                let nyzcon = $(this).parent().next().find(".nyzcon");
                nyzcon.eq(itemIndex).show().siblings(nyzcon).hide();

                if(itemIndex == 1){// 月份选项卡的数据
                    let nowmonth = Mounthnow();
                    $.ajax({
                        type: "GET",
                        dataType: "json",
                        url: "http://112.74.169.99:21021/api/services/app/ReportService/GetReportDLTDGDataByMonth?type="+thetype+"&groupid="+groupid+"&projectid="+projectid+"&month="+ nowmonth,
                        beforeSend: function (xhr) {
                            xhr.setRequestHeader("Accept", "application/json, text/javascript, */*; q=0.01");
                            xhr.setRequestHeader("Authorization", accessToken);
                            xhr.setRequestHeader('.AspNetCore.Culture', 'zh-Hans');
                        },
                        success: function (res) {
                            if(res.success == true){
                                let data = res.result;
                                $("#thedetailmounth").html('');
                                $("#thedetailmounth").html(selectsbeachcon(data));
                                $("#selectmonth").html(selectmontheach(nowmonth));
                                
                            }
                        }
                    });

                }else if(itemIndex == 2){// 年选项卡的数据
                    console.log("年选项卡的数据");
                }

            });


            // 月份下拉框切换
            $("#selectmonth").change(function () {

                var index1 = layer.load(0, {
                    shade: [0.8, '#fff']
                }); //0.1透明度的白色背景

                var mouthchose = Number($("#selectmonth option:selected").attr('value')) + 1;
                var groupid = $(this).parents('#tablist').prev().find("select").val();
                console.log(groupid);
                let thetype;
                if(groupid == 0){thetype = 1;}
                else{thetype = 0;}

                $.ajax({
                    type: "GET",
                    dataType: "json",
                    url: "http://112.74.169.99:21021/api/services/app/ReportService/GetReportDLTDGDataByMonth?type="+thetype+"&groupid="+groupid+"&projectid="+projectid+"&month="+ mouthchose,
                    beforeSend: function (xhr) {
                        xhr.setRequestHeader("Accept", "application/json, text/javascript, */*; q=0.01");
                        xhr.setRequestHeader("Authorization", accessToken);
                        xhr.setRequestHeader('.AspNetCore.Culture', 'zh-Hans');
                    },
                    success: function (res) {
                        if(res.success == true){
                            let data = res.result;
                            $("#thedetailmounth").html('');
                            $("#thedetailmounth").html(selectsbeachcon(data));
                            layer.close(index1);
                        }
                    }
                });
                
            });

            var num_index = 0;
            var pcs1_rp_1 = '';
            var pcs1_rp_2 = '';
            var pcs2_rp_1 = '';
            var pcs2_rp_2 = '';
            var xData = []; // x轴时间数据
            var yData1 = []; //实时发电功率的y轴数据
            var yData2 = []; //实时PCS功率的y轴数据
            var yData3 = []; //实时负载功率的y轴数据

            $.ajax({
                type: "GET",
                dataType: "json",
                url: "http://112.74.169.99:21021/api/services/app/ControlDataService/GetListControlDataByID?id=" + linechartid,
                beforeSend: function (xhr) {
                    xhr.setRequestHeader("Accept", "application/json, text/javascript, */*; q=0.01");
                    xhr.setRequestHeader("Authorization", accessToken);
                    xhr.setRequestHeader('.AspNetCore.Culture', 'zh-Hans');
                },
                success: function (data) {
                    console.log("折线图 请求成功");
                    console.log(data);
                    var data = data.result;
                    var szdata = [];
                    for (var i in data) {
                        if (data[i].devID === 11) {
                            szdata.push(data[i]);
                        }
                    }
                    for (let i = 0; i < szdata.length; i++) {
                        let datetime = new Date(szdata[i].creationTime);
                        let getHours = datetime.getHours() < 10 ? "0" + datetime.getHours() : datetime.getHours();
                        let getMinutes = datetime.getMinutes() < 10 ? "0" + datetime.getMinutes() : datetime.getMinutes();
                        let getSeconds = datetime.getSeconds() < 10 ? "0" + datetime.getSeconds() : datetime.getSeconds();
                        let time = getHours + ":" + getMinutes + ":" + getSeconds;
                        xData.push(time);
                        yData1.push(szdata[i].farTAP);
                        yData2.push(szdata[i].pcstap);
                        yData3.push(szdata[i].loadTAP);
                    }
                    updateData(); // 首次加载立即请求数据

                    setInterval(updateData, 1000); // 首次加载之后，每1s重新请求一次数据

                },
                error: function (err) {
                    console.log("折线图 请求失败");
                }
            });


            function updateData() { // 请求数据
                num_index++;
                var onoff = isPositiveNum(num_index / 15); //一分钟增加一次数据

                $.ajax({
                    type: "GET",
                    url: "http://112.74.169.99:21021/api/TokenAuth/GetProjectData?projectid=" + projectid,
                    success: function (res) {
                        var data = res.result;

                        let time = data[0].creationTime.split('T');

                        $("#showtime").html(' ');
                        $("#showtime").html('数据更新时间 ' + time[1].substring(0,8));
                        // 设备功率
                        if (data[11]) {
                            // BMS SOC 百分比
                            var val_soc_sz = Number((data[2].soc + data[3].soc) / 2).toFixed(0); // BMS SOC 百分比
                            $("#soc").html(val_soc_sz); // BMS SOC 百分比

                            var val_soh = (data[2].soh + data[3].soh) / 20;
                            $("#soh").html(val_soh); // //BMS SOH

                            var val_dwgl_sz = Number(data[6].powerGeneration + data[7].powerGeneration + data[8].powerGeneration + data[9].powerGeneration); // 发电功率
                            $("#dwgl").html(dealnumber(val_dwgl_sz)); // 发电功率

                            $("#pcsgl").html(dealnumber(data[11].pcstap)); // PCS总有功功率
                            $("#fzgl").html(dealnumber(data[11].loadTAP)); // 负载功率

                            $("#fnlz").html(dealnumber(data[11].countercurrentControl)); // 防逆流值

                            // 电表
                            $("#sz_fzgl").html( dealnumber(data[11].loadTAP) ); // 负载功率
                            $("#sz_zydl").html( dealnumber(data[12].tpap) ); // 总用电量

                            // 柴油机1
                            var cyjstatus1 = '';
                            var stopMode1 = data[6].stopMode;
                            var transferToMains1 = data[6].transferToMains;
                            if ((stopMode1 == 0) && (transferToMains1 == 0)) {
                                cyjstatus1 = '分闸运行';
                            } else if ((stopMode1 == 0) && (transferToMains1 == 1)) {
                                cyjstatus1 = '合闸运行';
                            } else if (stopMode1 == 1) {
                                cyjstatus1 = '停机';
                            }
                            var val_fuel_cnc1 = Number(data[6].fuelLevel).toFixed(0);
                            $("#zt_cnc1").html(cyjstatus1); // 状态

                            $("#gl_cnc1").html(dealnumber(data[6].powerGeneration)); // 发电功率
                            $("#ryw_cnc1").html(val_fuel_cnc1); // 燃油位 百分比

                            // 柴油机2
                            var cyjstatus2 = '';
                            var stopMode2 = data[7].stopMode;
                            var transferToMains2 = data[7].transferToMains;
                            if ((stopMode2 == 0) && (transferToMains2 == 0)) {
                                cyjstatus2 = '分闸运行';
                            } else if ((stopMode2 == 0) && (transferToMains2 == 1)) {
                                cyjstatus2 = '合闸运行';
                            } else if (stopMode2 == 1) {
                                cyjstatus2 = '停机';
                            }
                            var val_fuel_cnc2 = Number(data[7].fuelLevel).toFixed(0);
                            $("#zt_cnc2").html(cyjstatus2); // 状态
                            $("#gl_cnc2").html(dealnumber(data[7].powerGeneration)); // 功率
                            $("#ryw_cnc2").html(val_fuel_cnc2); // 燃油位 百分比

                            // 柴油机3
                            var cyjstatus3 = '';
                            var stopMode3 = data[8].stopMode;
                            var transferToMains3 = data[8].transferToMains;
                            if ((stopMode3 == 0) && (transferToMains3 == 0)) {
                                cyjstatus3 = '分闸运行';
                            } else if ((stopMode3 == 0) && (transferToMains3 == 1)) {
                                cyjstatus3 = '合闸运行';
                            } else if (stopMode3 == 1) {
                                cyjstatus3 = '停机';
                            }
                            var val_fuel_cnc3 = Number(data[8].fuelLevel).toFixed(0);
                            $("#zt_cnc3").html(cyjstatus3); // 状态
                            $("#gl_cnc3").html(dealnumber(data[8].powerGeneration)); // 功率
                            $("#ryw_cnc3").html(val_fuel_cnc3); // 燃油位 百分比

                            // 柴油机4
                            var cyjstatus4 = '';
                            var stopMode4 = data[9].stopMode;
                            var transferToMains4 = data[9].transferToMains;
                            if ((stopMode4 == 0) && (transferToMains4 == 0)) {
                                cyjstatus4 = '分闸运行';
                            } else if ((stopMode4 == 0) && (transferToMains4 == 1)) {
                                cyjstatus4 = '合闸运行';
                            } else if (stopMode4 == 1) {
                                cyjstatus4 = '停机';
                            }
                            var val_fuel_cnc4 = Number(data[9].fuelLevel).toFixed(0);
                            $("#zt_cnc4").html(cyjstatus4); // 状态
                            $("#gl_cnc4").html(dealnumber(data[9].powerGeneration)); // 功率
                            $("#ryw_cnc4").html(val_fuel_cnc4); // 燃油位 百分比

                            // PCS1
                            $("#pcszyggl_sz1").html(dealnumber(data[0].tap)); //PCS总有功功率
                            $("#pcszszgl_sz1").html(dealnumber(data[0]
                                .tApparentP)); //PCS总视在功率
                            $("#pcszwggl_sz1").html(dealnumber(data[0].trp)); //PCS总无功功率

                            // PCS2
                            $("#pcszyggl_sz2").html(dealnumber(data[1].tap)); //PCS总有功功率
                            $("#pcszszgl_sz2").html(dealnumber(data[1]
                                .tApparentP)); //PCS总视在功率
                            $("#pcszwggl_sz2").html(dealnumber(data[1].trp)); //PCS总无功功率

                            // BMS1
                            $("#bmssoc1").html(dealnumber(data[2].soc)); //BMS SOC
                            $("#bmskcdl1").html(dealnumber(data[2].group_RC)); //BMS可充电量
                            $("#bmskfdl1").html(dealnumber(data[2].group_DQ)); //BMS可放电量

                            // BMS2
                            $("#bmssoc2").html(dealnumber(data[3].soc)); //BMS SOC
                            $("#bmskcdl2").html(dealnumber(data[3].group_RC)); //BMS可充电量
                            $("#bmskfdl2").html(dealnumber(data[3].group_DQ)); //BMS可放电量

                            // 设备温度1
                            $("#fkwd1").html(dealnumber(data[0].radiatorT)); //散热器温度
                            $("#jgwd1").html(dealnumber(data[0].cabinetT)); //机柜温度
                            $("#hjwd1").html(dealnumber(data[0].environmentalT)); //环境温度
                            $("#dczgwd1").html(dealnumber(data[2].mbt)); //电池最高温度
                            $("#dczdwd1").html(dealnumber(data[2].lbt)); //电池最低温度

                            // 设备温度2
                            $("#fkwd2").html(dealnumber(data[1].radiatorT)); //散热器温度
                            $("#jgwd2").html(dealnumber(data[1].cabinetT)); //机柜温度
                            $("#hjwd2").html(dealnumber(data[1].environmentalT)); //环境温度
                            $("#dczgwd2").html(dealnumber(data[3].mbt)); //电池最高温度
                            $("#dczdwd2").html(dealnumber(data[3].lbt)); //电池最低温度

                            // 设备状态1
                            if (data[0].acDispatch) {
                                // 交流调度
                                $(".jldt1 span").attr('class', 'onoff zton');
                            } else {
                                $(".jldt1 span").attr('class', 'onoff ztoff');
                            }
                            if (data[0].dcDispatch) {
                                // 直流调度
                                $(".zldd1 span").attr('class', 'onoff zton');
                            } else {
                                $(".zldd1 span").attr('class', 'onoff ztoff');
                            }
                            if (data[0].runState) {
                                // PCS通讯状态/运行状态
                                $(".pcstxzt1 span").attr('class', 'onoff zton');
                            } else {
                                $(".pcstxzt1 span").attr('class', 'onoff ztoff');
                            }
                            if (data[2].comState) {
                                // BMS通讯状态
                                $(".bmstxzt1 span").attr('class', 'onoff zton');
                            } else {
                                $(".bmstxzt1 span").attr('class', 'onoff ztoff');
                            }

                            if (data[0].gridState) {
                                // 并网、离网
                                $(".bw1 span").attr('class', 'onoff ztoff');
                                $(".lw1 span").attr('class', 'onoff zton');
                            } else {
                                $(".bw1 span").attr('class', 'onoff zton');
                                $(".lw1 span").attr('class', 'onoff ztoff');
                            }
                            if (data[0].warnState) {
                                // 系统告警/告警状态
                                $(".xtjg1 span").attr('class', 'onoff zton');
                            } else {
                                $(".xtjg1 span").attr('class', 'onoff ztoff');
                            }
                            if (data[0].failureStatus) {
                                // 系统故障/故障状态
                                $(".xtgz1 span").attr('class', 'onoff zton');
                            } else {
                                $(".xtgz1 span").attr('class', 'onoff ztoff');
                            }

                            if (data[0].remoteControl) {
                                // 远程控制
                                $(".yckz1 span").attr('class', 'onoff zton');
                            } else {
                                $(".yckz1 span").attr('class', 'onoff ztoff');
                            }

                            if (data[2].primaryAlarm) {
                                // BMS一级告警
                                $(".yjjg1 span").attr('class', 'onoff zton');
                            } else {
                                $(".yjjg1 span").attr('class', 'onoff ztoff');
                            }

                            if (data[2].secondaryAlarm) {
                                // BMS二级告警
                                $(".ejjg1 span").attr('class', 'onoff zton');
                            } else {
                                $(".ejjg1 span").attr('class', 'onoff ztoff');
                            }

                            if (data[2].tertiaryAlarm) {
                                // BMS三级告警
                                $(".sjjg1 span").attr('class', 'onoff zton');
                            } else {
                                $(".sjjg1 span").attr('class', 'onoff ztoff');
                            }

                            // 设备状态2
                            if (data[1].acDispatch) {
                                // 交流调度
                                $(".jldt2 span").attr('class', 'onoff zton');
                            } else {
                                $(".jldt2 span").attr('class', 'onoff ztoff');
                            }
                            if (data[1].dcDispatch) {
                                // 直流调度
                                $(".zldd2 span").attr('class', 'onoff zton');
                            } else {
                                $(".zldd2 span").attr('class', 'onoff ztoff');
                            }
                            if (data[1].runState) {
                                // PCS通讯状态/运行状态
                                $(".pcstxzt2 span").attr('class', 'onoff zton');
                            } else {
                                $(".pcstxzt2 span").attr('class', 'onoff ztoff');
                            }
                            if (data[3].comState) {
                                // BMS通讯状态
                                $(".bmstxzt2 span").attr('class', 'onoff zton');
                            } else {
                                $(".bmstxzt2 span").attr('class', 'onoff ztoff');
                            }

                            if (data[1].gridState) {
                                // 并网、离网
                                $(".bw2 span").attr('class', 'onoff ztoff');
                                $(".lw2 span").attr('class', 'onoff zton');
                            } else {
                                $(".bw2 span").attr('class', 'onoff zton');
                                $(".lw2 span").attr('class', 'onoff ztoff');
                            }
                            if (data[1].warnState) {
                                // 系统告警/告警状态
                                $(".xtjg2 span").attr('class', 'onoff zton');
                            } else {
                                $(".xtjg2 span").attr('class', 'onoff ztoff');
                            }
                            if (data[1].failureStatus) {
                                // 系统故障/故障状态
                                $(".xtgz2 span").attr('class', 'onoff zton');
                            } else {
                                $(".xtgz2 span").attr('class', 'onoff ztoff');
                            }

                            if (data[1].remoteControl) {
                                // 远程控制
                                $(".yckz2 span").attr('class', 'onoff zton');
                            } else {
                                $(".yckz2 span").attr('class', 'onoff ztoff');
                            }

                            if (data[3].primaryAlarm) {
                                // BMS一级告警
                                $(".yjjg2 span").attr('class', 'onoff zton');
                            } else {
                                $(".yjjg2 span").attr('class', 'onoff ztoff');
                            }

                            if (data[3].secondaryAlarm) {
                                // BMS二级告警
                                $(".ejjg2 span").attr('class', 'onoff zton');
                            } else {
                                $(".ejjg2 span").attr('class', 'onoff ztoff');
                            }

                            if (data[3].tertiaryAlarm) {
                                // BMS三级告警
                                $(".sjjg2 span").attr('class', 'onoff zton');
                            } else {
                                $(".sjjg2 span").attr('class', 'onoff ztoff');
                            }


                            if (onoff) {
                                let datetimenew = new Date(data[11].creationTime);
                                let getHoursnew = datetimenew.getHours() < 10 ? "0" + datetimenew.getHours() : datetimenew.getHours();
                                let getMinutesnew = datetimenew.getMinutes() < 10 ? "0" + datetimenew.getMinutes() : datetimenew.getMinutes();
                                let getSecondsnew = datetimenew.getSeconds() < 10 ? "0" + datetimenew.getSeconds() : datetimenew.getSeconds();
                                let timenew = getHoursnew + ":" + getMinutesnew + ":" + getSecondsnew;
                                xData.push(timenew);
                                yData1.push(data[11].farTAP);
                                yData2.push(data[11].pcstap);
                                yData3.push(data[11].loadTAP);
                            }
                            // 实时发电功率
                            var echarts1 = echarts.init(document.getElementById("echarts1"));
                            var echarts1_option = {
                                title: {
                                    top: "0",
                                    left: "10px",
                                    text: "实时发电功率(kW)",
                                    textStyle: {
                                        align: "left",
                                        color: "#7F94B2",
                                        fontWeight: "800",
                                        fontSize: 15
                                    }
                                },
                                backgroundColor: "#112957",
                                grid: {
                                    right: "0",
                                    bottom: "0",
                                    left: "15px",
                                    top: "40px",
                                    containLabel: true
                                },
                                xAxis: [{
                                    type: "category",
                                    data: xData,
                                    axisLine: {
                                        //坐标轴轴线相关设置
                                        lineStyle: {
                                            color: "#223863",
                                            width: "1"
                                        }
                                    },
                                    axisTick: {
                                        //坐标轴刻度相关设置
                                        show: true,
                                        lineStyle: {
                                            color: "#223863",
                                            width: "1"
                                        },
                                        length: 3
                                    },
                                    axisLabel: {
                                        //坐标轴刻度标签的相关设置
                                        show: true,
                                        // interval:1,
                                        textStyle: {
                                            color: "#7F94B2",
                                            fontSize: 9
                                        },
                                        rotate: 30
                                    }
                                }],
                                yAxis: [{
                                    type: "value",
                                    position: "left",
                                    // interval: 50,
                                    // max: 350,
                                    // min: 250,
                                    axisLine: {
                                        //坐标轴轴线相关设置
                                        lineStyle: {
                                            color: "#223863",
                                            width: "1"
                                        }
                                    },
                                    splitLine: {
                                        show: false
                                    },
                                    axisTick: {
                                        //坐标轴刻度相关设置
                                        show: false
                                    },
                                    axisLabel: {
                                        //坐标轴刻度标签的相关设置
                                        show: true,
                                        color: "#7F94B2",
                                        fontSize: 9
                                    },
                                    // scale: true
                                }],
                                series: [{
                                    type: "line",
                                    yAxisIndex: 0,
                                    symbolSize: 4,
                                    itemStyle: {
                                        normal: {
                                            color: "#0167FF"
                                        }
                                    },
                                    data: yData1
                                }]
                            };
                            echarts1.setOption(echarts1_option);

                            // 实时PCS功率
                            var echarts2 = echarts.init(document.getElementById("echarts2"));
                            var echarts2_option = {
                                title: {
                                    top: "0",
                                    left: "10px",
                                    text: "实时PCS功率(kW)",
                                    textStyle: {
                                        align: "left",
                                        color: "#7F94B2",
                                        fontWeight: "800",
                                        fontSize: 15
                                    }
                                },
                                backgroundColor: "#112957",
                                grid: {
                                    right: "0",
                                    bottom: "0",
                                    left: "15px",
                                    top: "40px",
                                    containLabel: true
                                },
                                xAxis: [{
                                    type: "category",
                                    data: xData,
                                    axisLine: {
                                        //坐标轴轴线相关设置
                                        lineStyle: {
                                            color: "#223863",
                                            width: "1"
                                        }
                                    },
                                    axisTick: {
                                        //坐标轴刻度相关设置
                                        show: true,
                                        lineStyle: {
                                            color: "#223863",
                                            width: "1"
                                        },
                                        length: 3
                                    },
                                    axisLabel: {
                                        //坐标轴刻度标签的相关设置
                                        show: true,
                                        // interval:1,
                                        textStyle: {
                                            color: "#7F94B2",
                                            fontSize: 9
                                        },
                                        rotate: 30
                                    }
                                }],
                                yAxis: [{
                                    type: "value",
                                    position: "left",
                                    // interval: 50,
                                    // max: 150,
                                    // min: -250,
                                    axisLine: {
                                        //坐标轴轴线相关设置
                                        lineStyle: {
                                            color: "#223863",
                                            width: "1"
                                        }
                                    },
                                    splitLine: {
                                        show: false
                                    },
                                    axisTick: {
                                        //坐标轴刻度相关设置
                                        show: false
                                    },
                                    axisLabel: {
                                        //坐标轴刻度标签的相关设置
                                        show: true,
                                        color: "#7F94B2",
                                        fontSize: 9
                                    },
                                    // scale: true
                                }],
                                series: [{
                                    type: "line",
                                    yAxisIndex: 0,
                                    symbolSize: 4,
                                    itemStyle: {
                                        normal: {
                                            color: "#0167FF"
                                        }
                                    },
                                    data: yData2
                                }]
                            };
                            echarts2.setOption(echarts2_option);

                            // 实时负载功率
                            var echarts3 = echarts.init(document.getElementById("echarts3"));
                            var echarts3_option = {
                                title: {
                                    top: "0",
                                    left: "10px",
                                    text: "实时负载功率(kW)",
                                    textStyle: {
                                        align: "left",
                                        color: "#7F94B2",
                                        fontWeight: "800",
                                        fontSize: 15
                                    }
                                },
                                backgroundColor: "#112957",
                                grid: {
                                    right: "0",
                                    bottom: "0",
                                    left: "15px",
                                    top: "40px",
                                    containLabel: true
                                },
                                xAxis: [{
                                    type: "category",
                                    data: xData,
                                    axisLine: {
                                        //坐标轴轴线相关设置
                                        lineStyle: {
                                            color: "#223863",
                                            width: "1"
                                        }
                                    },
                                    axisTick: {
                                        //坐标轴刻度相关设置
                                        show: true,
                                        lineStyle: {
                                            color: "#223863",
                                            width: "1"
                                        },
                                        length: 3
                                    },
                                    axisLabel: {
                                        //坐标轴刻度标签的相关设置
                                        show: true,
                                        // interval:1,
                                        textStyle: {
                                            color: "#7F94B2",
                                            fontSize: 9
                                        },
                                        rotate: 30
                                    }
                                }],
                                yAxis: [{
                                    type: "value",
                                    position: "left",
                                    // interval: 100,
                                    // max: 600,
                                    // min: 100,
                                    axisLine: {
                                        //坐标轴轴线相关设置
                                        lineStyle: {
                                            color: "#223863",
                                            width: "1"
                                        }
                                    },
                                    splitLine: {
                                        show: false
                                    },
                                    axisTick: {
                                        //坐标轴刻度相关设置
                                        show: false
                                    },
                                    axisLabel: {
                                        //坐标轴刻度标签的相关设置
                                        show: true,
                                        color: "#7F94B2",
                                        fontSize: 9
                                    },
                                    // scale: true
                                }],
                                series: [{
                                    type: "line",
                                    yAxisIndex: 0,
                                    symbolSize: 4,
                                    itemStyle: {
                                        normal: {
                                            color: "#0167FF"
                                        }
                                    },
                                    data: yData3
                                }]
                            };
                            echarts3.setOption(echarts3_option);

                        }



                        // 一次系统图
                        // 一级柜数据
                        var cyj_rp = data[11].farTAP;
                        $("#cyj_rp").html(cyj_rp);
                        var cyj_sxdy = data[11].aFarACV;
                        cyj_sxdy = cyj_sxdy + "/" + data[11].bFarACV;
                        cyj_sxdy = cyj_sxdy + "/" + data[11].cFarACV;
                        $("#cyj_sxdy").html(cyj_sxdy);
                        var cyj_sxdl = data[11].aFarACA;
                        cyj_sxdl = cyj_sxdl + "/" + data[11].bFarACA;
                        cyj_sxdl = cyj_sxdl + "/" + data[11].cFarACA;
                        $("#cyj_sxdl").html(cyj_sxdl);

                        // 负载数据
                        var load = data[11].loadTAP;
                        $("#load").html(load);

                        // pcs1
                        var pcs1_sxdy = data[0].abacv;
                        pcs1_sxdy = pcs1_sxdy + "/" + data[0].bcacv;
                        pcs1_sxdy = pcs1_sxdy + "/" + data[0].caacv;
                        $("#pcs1_sxdy").html(pcs1_sxdy);
                        var pcs1_sxdl = data[0].aaci;
                        pcs1_sxdl = pcs1_sxdl + "/" + data[0].baci;
                        pcs1_sxdl = pcs1_sxdl + "/" + data[0].caci;
                        $("#pcs1_sxdl").html(pcs1_sxdl);
                        var pcs1_rp = data[0].tap;
                        $("#pcs1_rp").html(pcs1_rp);
                        if (num_index === 1) {
                            pcs1_rp_1 = data[0].tap;
                            if (pcs1_rp_1 < 0) {
                                $("#pcs1").html(`<div id="gdownline11" class="vp vpthin gotop" style="left:20%; top:13.5%;  height:28%;z-index: 1;"> </div>` +
                                                `<div id="gdownline12" class="vpdif vpthin gotop" style="left:20%; top:45%;  height:35%;z-index: 1;"></div>`);
                            } else if (pcs1_rp_1 > 0) {
                                $("#pcs1").html(`<div id="gdownline11" class="vp vpthin godown" style="left:20%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                                `<div id="gdownline12" class="vpdif vpthin godown" style="left:20%; top:45%;  height:35%;z-index: 1;"></div>`);
                            } else if (pcs1_rp_1 === 0) {
                                $("#pcs1").html(`<div id="gdownline11" class="vp vpthin" style="left:20%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                                `<div id="gdownline12" class="vpdif vpthin" style="left:20%; top:45%;  height:35%;z-index: 1;"></div>`);
                            }
                        } else {
                            pcs1_rp_2 = data[0].tap;
                            var pcs1_rp_1_sign = Math.sign(pcs1_rp_1);
                            var pcs1_rp_2_sign = Math.sign(pcs1_rp_2);
                            if (pcs1_rp_1_sign != pcs1_rp_2_sign) {
                                if (pcs1_rp < 0) {
                                    $("#pcs1").html(
                                        `<div id="gdownline11" class="vp vpthin gotop" style="left:20%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                        `<div id="gdownline12" class="vpdif vpthin gotop" style="left:25%; top:45%;  height:35%;z-index: 1;"></div>`
                                    );
                                } else if (pcs1_rp > 0) {
                                    $("#pcs1").html(
                                        `<div id="gdownline11" class="vp vpthin godown" style="left:20%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                        `<div id="gdownline12" class="vpdif vpthin godown" style="left:25%; top:45%;  height:35%;z-index: 1;"></div>`
                                    );
                                } else if (pcs1_rp === 0) {
                                    $("#pcs1").html(
                                        `<div id="gdownline11" class="vp vpthin" style="left:20%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                        `<div id="gdownline12" class="vpdif vpthin" style="left:25%; top:45%;  height:35%;z-index: 1;"></div>`
                                    );
                                }
                            }

                        }

                        if (data[0].gridState == 0) {
                            var pcs1_blw = "并网";
                        } else {
                            var pcs1_blw = "离网";
                        }
                        $("#pcs1_blw").html(pcs1_blw);

                        // pcs2
                        var pcs2_sxdy = data[1].abacv;
                        pcs2_sxdy = pcs2_sxdy + "/" + data[1].bcacv;
                        pcs2_sxdy = pcs2_sxdy + "/" + data[1].caacv;
                        $("#pcs2_sxdy").html(pcs2_sxdy);
                        var pcs2_sxdl = data[1].aaci;
                        pcs2_sxdl = pcs2_sxdl + "/" + data[1].baci;
                        pcs2_sxdl = pcs2_sxdl + "/" + data[1].caci;
                        $("#pcs2_sxdl").html(pcs2_sxdl);

                        var pcs2_rp = data[1].tap;
                        $("#pcs2_rp").html(pcs2_rp);
                        if (num_index === 1) {
                            pcs2_rp_1 = data[1].tap;
                            if (pcs2_rp_1 < 0) {
                                $("#pcs2").html(`<div id="gdownline21" class="vp vpthin gotop" style="left:58%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                                `<div id="gdownline22" class="vpdif vpthin gotop" style="left:58%; top:45%;  height:35%;z-index: 1;"></div>`);
                            } else if (pcs2_rp_1 > 0) {
                                $("#pcs2").html(`<div id="gdownline21" class="vp vpthin godown" style="left:58%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                                `<div id="gdownline22" class="vpdif vpthin godown" style="left:58%; top:45%;  height:35%;z-index: 1;"></div>`);
                            } else if (pcs2_rp_1 === 0) {
                                $("#pcs2").html(`<div id="gdownline21" class="vp vpthin" style="left:58%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                                `<div id="gdownline22" class="vpdif vpthin" style="left:58%; top:45%;  height:35%;z-index: 1;"></div>`);
                            }

                        } else {
                            pcs2_rp_2 = data[1].tap;
                            var pcs2_rp_1_sign = Math.sign(pcs2_rp_1);
                            var pcs2_rp_2_sign = Math.sign(pcs2_rp_2);

                            if (pcs2_rp_1_sign != pcs2_rp_2_sign) {
                                if (pcs2_rp_2 < 0) {
                                    $("#pcs2").html(`<div id="gdownline21" class="vp vpthin gotop" style="left:58%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                                    `<div id="gdownline22" class="vpdif vpthin gotop" style="left:58%; top:45%;  height:35%;z-index: 1;"></div>`);
                                } else if (pcs2_rp_2 > 0) {
                                    $("#pcs2").html(`<div id="gdownline21" class="vp vpthin godown" style="left:58%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                                    `<div id="gdownline22" class="vpdif vpthin godown" style="left:58%; top:45%;  height:35%;z-index: 1;"></div>`);
                                } else if (pcs2_rp_2 === 0) {
                                    $("#pcs2").html(`<div id="gdownline21" class="vp vpthin" style="left:58%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                                    `<div id="gdownline22" class="vpdif vpthin" style="left:58%; top:45%;  height:35%;z-index: 1;"></div>`);
                                }
                            }
                        }

                        if (data[1].gridState == 0) {
                            var pcs2_blw = "并网";
                        } else {
                            var pcs2_blw = "离网";
                        }
                        $("#pcs2_blw").html(pcs2_blw);


                        // bms1
                        var bms1_dl = data[2].group_I;
                        $("#bms1_dl").html(bms1_dl);
                        var bms1_dy = data[2].group_V;
                        $("#bms1_dy").html(bms1_dy);
                        var bms1_soc = data[2].soc;
                        $("#bms1_soc").html(bms1_soc);

                     
                        $("#mbtid1").html(data[2].mbtid);
                        $("#lbtid1").html(data[2].lbtid);

                        // bms2
                        var bms2_dl = data[3].group_I;
                        $("#bms2_dl").html(bms2_dl);
                        var bms2_dy = data[3].group_V;
                        $("#bms2_dy").html(bms2_dy);
                        var bms2_soc = data[3].soc;
                        $("#bms2_soc").html(bms2_soc);

                        $("#mbtid2").html(data[3].mbtid);
                        $("#lbtid2").html(data[3].lbtid);

                        // ac1
                        var ac1_sd = data[4].humidity;
                        $("#ac1_sd").html(ac1_sd);
                        var ac1_wd = data[4].innerTemperature;
                        $("#ac1_wd").html(ac1_wd);

                        // ac2
                        var ac2_sd = data[5].humidity;
                        $("#ac2_sd").html(ac2_sd);
                        var ac2_wd = data[5].innerTemperature;
                        $("#ac2_wd").html(ac2_wd);

                    },
                    error: function (err) {
                        console.log("项目状态参数 请求失败");
                    }
                });
            }
            
            // 跳转到柴油机设备的页面
            $(".tocyj").click(function(){
                window.location.href='mainmonitorsz/mainmonitor_szcyj.html?projectid=' + projectid;
            });

            // 跳转到一级柜设备的页面
            $(".toyjg").click(function(){
                window.location.href='mainmonitorsz/mainmonitor_szyjg.html?projectid=' + projectid;
            });

            // 跳转到pcs设备的页面
            $(".topcs").click(function(){
                window.location.href='mainmonitorsz/mainmonitor_szpcs.html?projectid=' + projectid;
            });

            // 跳转到bms设备的页面
            $(".tobms").click(function(){
                window.location.href='mainmonitorsz/mainmonitor_szbms.html?projectid=' + projectid;
            });

            function selectsbeach(obj) {
                var str = '';

                if (obj.constructor==Array) {
                    str += `<option value="0" >所有设备</option>`;
                    for(var i = 0, len = obj.length; i < len; i++){
                        str += `<option value="`+obj[i].id+`">`+obj[i].groupName+`</option>`
                    }
                    return str;
                }
               
                return obj;
            }

            function selectmontheach(nowmonth) {
                var str = '';

                for(var i = 0, len = nowmonth; i < len; i++){
                    let showmonth;
                    if(i==0){showmonth="一月"}
                    else if(i==1){showmonth="二月"}
                    else if(i==2){showmonth="三月"}
                    else if(i==3){showmonth="四月"}
                    else if(i==4){showmonth="五月"}
                    else if(i==5){showmonth="六月"}
                    else if(i==6){showmonth="七月"}
                    else if(i==7){showmonth="八月"}
                    else if(i==8){showmonth="九月"}
                    else if(i==9){showmonth="十月"}
                    else if(i==10){showmonth="十一月"}
                    else if(i==11){showmonth="十二月"}

                        
                    if( i!=(nowmonth-1) ){
                        str += `<option value="` + i + `">` + showmonth + `</option>`;
                        
                    }else if(i==(nowmonth-1)){
                        str += `<option value="` + i + `" selected>` + showmonth + `</option>`;
                    }
                }
                return str;

            }

            function selectsbeachcon(data) {
                var str = ``;
                        
                for(var i=0;i<data.length;i++){
                    str += `
                    <div class="conlist">
                        <div class="listup">
                            <span></span><span>`+Mounthdate(data[i].time)+`</span>
                        </div>
                        <div class="listdown">
                            <ul>
                                <li>
                                    <p>燃油消耗</p>
                                    <div class="ztdiv">
                                        <span id="cqsd">`+data[i].usedAcc+`</span><span>L</span>
                                    </div>
                                </li>
                                <li>
                                    <p>发电量</p>
                                    <div class="ztdiv">
                                        <span id="pduwd">`+data[i].positiveKWh+`</span><span>kWh</span>
                                    </div>
                                </li>
                                <li>
                                    <p>用电量</p>
                                    <div class="ztdiv">
                                        <span>`+data[i].tpap+`</span><span>kWh</span>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>`;
                } //for循环结束
                return str;
            }// 函数结束

        });
    </script>
</body>

</html>